package com.ruoyi.score.service.impl;

import com.ruoyi.score.domain.HouseVoteScore;
import com.ruoyi.score.mapper.HouseVoteScoreMapper;
import com.ruoyi.score.service.IHouseVoteScoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 投票结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-07
 */
@Service
public class HouseVoteScoreServiceImpl implements IHouseVoteScoreService
{
    @Autowired
    private HouseVoteScoreMapper houseVoteScoreMapper;

    /**
     * 查询投票结果
     * 
     * @param scoreId 投票结果主键
     * @return 投票结果
     */
    @Override
    public HouseVoteScore selectHouseVoteScoreByScoreId(Long scoreId)
    {
        return houseVoteScoreMapper.selectHouseVoteScoreByScoreId(scoreId);
    }

    /**
     * 查询投票结果列表
     * 
     * @param houseVoteScore 投票结果
     * @return 投票结果
     */
    @Override
    public List<HouseVoteScore> selectHouseVoteScoreList(HouseVoteScore houseVoteScore)
    {
        return houseVoteScoreMapper.selectHouseVoteScoreList(houseVoteScore);
    }

    /**
     * 新增投票结果
     * 
     * @param houseVoteScore 投票结果
     * @return 结果
     */
    @Override
    public int insertHouseVoteScore(HouseVoteScore houseVoteScore)
    {
        return houseVoteScoreMapper.insertHouseVoteScore(houseVoteScore);
    }

    /**
     * 修改投票结果
     * 
     * @param houseVoteScore 投票结果
     * @return 结果
     */
    @Override
    public int updateHouseVoteScore(HouseVoteScore houseVoteScore)
    {
        return houseVoteScoreMapper.updateHouseVoteScore(houseVoteScore);
    }

    /**
     * 批量删除投票结果
     * 
     * @param scoreIds 需要删除的投票结果主键
     * @return 结果
     */
    @Override
    public int deleteHouseVoteScoreByScoreIds(Long[] scoreIds)
    {
        return houseVoteScoreMapper.deleteHouseVoteScoreByScoreIds(scoreIds);
    }

    /**
     * 删除投票结果信息
     * 
     * @param scoreId 投票结果主键
     * @return 结果
     */
    @Override
    public int deleteHouseVoteScoreByScoreId(Long scoreId)
    {
        return houseVoteScoreMapper.deleteHouseVoteScoreByScoreId(scoreId);
    }
}
